home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / C_DOWNLOAD.CGI-S=TEXTCLOCK&C=TXT&F=README < prev    next >
Text File  |  1996-06-03  |  8KB  |  162 lines

  1. /*****************************************************************************
  2. * TextClock  (C++ Version)      Version 1.0.3                                *
  3. * Copyright 1996 Matt Wright    mattw@worldwidemart.com                      *
  4. * Created 07/15/96              Last Modified 03/29/97                       *
  5. * Matt's Script Archive, Inc.   http://www.worldwidemart.com/scripts/        *
  6. ******************************************************************************
  7. * If you run into any problems while trying to configure this scripts, help  *
  8. * is available.  The steps you should take to get the fastest results, are:  *
  9. *     1) Read this file thoroughly                                           *
  10. *     2) Consult the Matt's Script Archive Frequently Asked Questions:       *
  11. *        http://www.worldwidemart.com/scripts/faq/                           *
  12. *     3) If you are still having difficulty installing this script, send     *
  13. *       e-mail to: scripts-help@tahoenet.com                                 *
  14. *       Include any error messages you are receiving and as much detail      * 
  15. *       as you can so we can spot your problem.  Also include the variable   *
  16. *       configuration block that is located at the top of the script.        *
  17. *                                                                            *
  18. * Hopefully we will be able to help you solve your problems.  Thank you.     *
  19. ******************************************************************************
  20. * COPYRIGHT NOTICE                                                           *
  21. * Copyright 1996 Matthew M. Wright  All Rights Reserved.                     *
  22. *                                                                            *
  23. * TextClock may be used and modified free of charge by anyone so long as     *
  24. * this copyright notice and the comments above remain intact.  By using this *
  25. * code you agree to indemnify Matthew M. Wright from any liability that      *
  26. * might arise from it's use.                                                 *
  27. *                                                                            *
  28. * Selling the code for this program without prior written consent is         *
  29. * expressly forbidden.  In other words, please ask first before you try and  *
  30. * make money off of my program.                                              *
  31. *                                                                            *
  32. * Obtain permission before redistributing this software over the Internet or *
  33. * in any other medium.  In all cases copyright and header must remain intact *
  34. *****************************************************************************/
  35.  
  36. TextClock is a C++ CGI program which is meant to be run from Server Side 
  37. Includes.  For more information on Server Side Includes, check out the 
  38. FAQ at the URL mentioned above.  When this script is implemented, it can 
  39. be used to show browsers several variations of the current time and/or 
  40. date.
  41.  
  42. There are two files included with this script:
  43.         1) README     - This file; includes detailed installation 
  44.                         instructions.
  45.         2) tclock.cpp - The Perl script which generates the headers and
  46.                         sends the current time and/or date to your user.
  47.  
  48. Should you encounter any problems running this script, such as Method Not
  49. Implemented, try changing the name of the program to tclock.cgi, 
  50. as some servers require the use of .cgi extensions.  Otherwise, this 
  51. script must be placed in your cgi-bin.  There are several variables which
  52. must be edited in the tclock.cpp script.
  53.  
  54. TCLOCK.CPP -
  55.  
  56.     There are nine variables in the tclock.cpp script, however
  57.     if you wish to receive the default display, you need not edit any
  58.     of them.  You can mix and match all of these options and see which
  59.     kind of clock you like the best.  You can get the clock to display
  60.     only the day of the week, only the date, only the time, everything
  61.     or make up your own combination!
  62.  
  63.       const int Display_Week_Day = 1;
  64.             If this option is set to 1, the day of the week will be 
  65.             displayed; Possible Values: Monday, Tuesday, Wednesday,
  66.             Thursday, Friday, Saturday and Sunday.  Setting this option
  67.             to 0 will suppress the printing of the Day of the Week.
  68.  
  69.       const int Display_Month = 1;
  70.             If this option is set to 1, the month will be printed.
  71.             Possible values include: January, February, March, April, May,
  72.             June, July, August, September, October, November and December.
  73.             If this option is set to 0, the month will not be displayed.
  74.  
  75.       const int Display_Month_Day = 1;
  76.             If this option is set to 1, the day of the month is
  77.             displayed, containing a value from 01 - 31.  Setting this to
  78.             0 will hide the Day of the Month.
  79.  
  80.       const int Display_Year = 1;
  81.             If this option is set to 1, the four digit year is 
  82.             displayed, and it can be hidden by setting this to 0.
  83.  
  84.       const int Display_Time = 1;
  85.             If this option is set to '1', a twenty four hour clock is
  86.             displayed.  Otherwise, if it is set to '0', it is supressed.
  87.  
  88.       const int Display_Time_Zone = 1;
  89.         Setting this to 1 allows users to your site to know what
  90.         time zone the date is being displayed from.  If it is set
  91.         to 1, the script will determine if it is Daylight Savings
  92.         or not.  If so, it uses Daylight_Time_Zone as the Time Zone
  93.         to display.  Otherwise it uses Standard_Time_Zone.
  94.  
  95.       const char Standard_Time_Zone[4] = "EST";
  96.       const char Daylight_Time_Zone[4] = "EDT";
  97.         These are the names of your Time Zones.  The ones shown above
  98.         represent Eastern Coast Time Zones.  Other ones in the US
  99.         include Central Time (CST/CDT), Mountain Time (MST/MDT) and
  100.         Pacific Coast Time (PST/PDT).
  101.  
  102.       const char Display_Link[] = "http://www.worldwidemart.com/scripts/";
  103.         Wanna be generous and offer visitors a link to my site where
  104.         they can download this script?  If so, leave my URL in here
  105.         and the displayed date will be linked to my web site.
  106.         Otherwise, set it "" for no link or put in a different URL to
  107.             link elsewhere.
  108.  
  109. ******************************************************************************
  110.  
  111. COMPILING THIS PROGRAM
  112.  
  113. This program was written to compile on a BSDI BSD/OS version 2.1 with the
  114. g++ compiler.  In order to compile it and get it ready for execution:
  115.  
  116. g++ tclock.cpp
  117. mv a.out tclock
  118.  
  119. You can change tclock above to tclock.cgi if you need .cgi extensions for
  120. CGI programs to work on your web server.
  121.  
  122. I tried to compile under MS Visual C++ Version 4.0 and it compiled and ran
  123. fine.
  124.  
  125. If the compiling and stuff doesn't work out, an easier way of getting a
  126. TextCounter for your web page may be to go to Matt's Script Archive and
  127. download the Perl version.
  128.  
  129. ******************************************************************************
  130.  
  131.         How to Call This Script From Your Web Page
  132.         ------------------------------------------
  133.  
  134. Calling this script from a web page is fairly simple.  You just use a standard
  135. Server Side Include call, such as:
  136.  
  137.       <!--#exec cgi="/url/path/to/tclock.cgi"-->
  138.  
  139.                         OR
  140.  
  141.       <!--#include virtual="/url/path/to/tclock.cgi"-->
  142.  
  143. ******************************************************************************
  144.  
  145. HISTORY
  146.  
  147.    Version 1.0.3   - 03/29/97     - Program converted to C++
  148.                                   - You can now link to other URLs with the
  149.                                     clock, not just mine. :-)
  150.    Version 1.0.2   - 07/15/96     - Missing ' after Day of the Week Fixed.
  151.    Version 1.0.1   - 07/15/96     - Minor Day of the Week Problem Fixed.
  152.    Version 1.0     - 07/15/95     - First Version Released.
  153.  
  154. ******************************************************************************
  155.  
  156. Have fun with this script, but if you implement it on a page, please let me 
  157. know the URL of where it is implemented so I can see my work.
  158.  
  159. If you have any questions, let me know and I will try and help!
  160. ______________________________________________________________________________
  161. Matt Wright - mattw@worldwidemart.com - http://www.worldwidemart.com/scripts/
  162.